package com.egao.common.module.push.controller;

import com.egao.common.core.annotation.ApiPageParam;
import com.egao.common.core.annotation.OperLog;
import com.egao.common.core.web.BaseController;
import com.egao.common.core.web.JsonResult;
import com.egao.common.module.push.service.PushMsgService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author qiujunfeng
 * @date 2024-05-15
 */
@Api(tags = "消息推送统计")
@RestController
@RequestMapping("${api}")
public class PushMsgStatisticsController extends BaseController {

    @Autowired
    private PushMsgService pushMsgService;


    @OperLog(value = "查询消息总推送量", desc = "查询消息总推送量")
    @ApiOperation(value = "查询消息总推送量")
    @ApiPageParam
    @GetMapping("/push/statistics")
    public JsonResult getAllPushCount(Integer year) {
        return pushMsgService.getAllPushCount(year);
    }

    @OperLog(value = "查询各学院的推送统计", desc = "查询各学院的推送统计")
    @ApiOperation(value = "查询各学院的推送统计")
    @ApiPageParam
    @GetMapping("/push/college/statistics")
    public JsonResult getCollegeAllPushCount(Integer year) {
        return pushMsgService.getCollegeAllPushCount(year);
    }



}